all: implement RFC8910 captive portal (CP) option
authorPaul Donald <[email protected]>
Sun, 16 Nov 2025 12:47:10 +0000 (13:47 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 24 Nov 2025 09:29:49 +0000 (10:29 +0100)
commit3484787e9a5b499e7f2b3cd87b8c53f8e9555cae
tree83802ba5031f6e6dc57d680e9b19a922d41b1c8e
parent25a0c40580f95c83cdacad6d1ca17d4046d14df5
all: implement RFC8910 captive portal (CP) option

https://www.rfc-editor.org/rfc/rfc8910.html

RFC8908 defines a captive portal client (CPC) that handles the API URI returned.

The captive portal (CP) option presence signals a portal that requires
authentication beyond what odhcp6c currently handles.

It's possible that a user connecting through an openwrt gateway encounters the
portal anyway (though this behaviour depends on the portal), but if this is not
the case, with this addition we can:
 - surface a message in a UI as to presence of the CP
 - signal that users install a CPC (a chicken/egg problem behind a CP)
 - provide the API URI for downstream consumers.

This should ease the use of travel router scenarios.

Downstream consumers of the API URI can find it via the CAPTIVE_PORTAL_URI
environment/ubus property.

The strengths of having this option handled means downstream consumers get one
unified environment variable since ra.c does not yet handle CUSTOM_* the way
DHCPv6 does.

Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcp6c/pull/127
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
README.md
src/dhcpv6.c
src/odhcp6c.c
src/odhcp6c.h
src/ra.c
src/ra.h
src/script.c
src/ubus.c